package com.supermap.dubbo.api.common.entity;

import java.util.List;

public class DataTable<T> {
    //数据库中总的记录数
    private long totalRecord;
    //总页数
    private int totalPage;
    //开始索引
    private int startIndex;
    //每页显示的记录数
    private int pageSize;
    //当前页为第几页
    private int pageNum;
    //起始页
    private int start;
    //能显示的尾页
    private int end;
    //当前页数据总数
    private List<T> data;

    public DataTable() {
    }

    public DataTable(long totalRecord, int totalPage, int startIndex, int pageSize, int pageNum, int start, int end) {
        this.totalRecord = totalRecord;
        this.totalPage = totalPage;
        this.startIndex = startIndex;
        this.pageSize = pageSize;
        this.pageNum = pageNum;
        this.start = start;
        this.end = end;
    }

    public long getTotalRecord() {
        return totalRecord;
    }

    public void setTotalRecord(long totalRecord) {
        this.totalRecord = totalRecord;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public int getStartIndex() {
        return startIndex;
    }

    public void setStartIndex(int startIndex) {
        this.startIndex = startIndex;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }

    public int getEnd() {
        return end;
    }

    public void setEnd(int end) {
        this.end = end;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
